%clearfix {
	zoom: 1;

	&:before,
	&:after {
		display: table;
		clear: both;
		content: ' ';
	}
}

.ws-important-hide {
	display: none !important;
	visibility: hidden !important;
	position: absolute;
	top: -999999px;
}

/*
.webshims-debug-list {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	margin: 5px;
	padding: 5px;
	list-style: none;
	background: #fff;
	color: #930;
	font-size: 16px;
	font-weight: bold;
	max-height: 200px;
	z-index: 99999;
	overflow-y: auto;
	
	li {
		border: 1px solid #c60;
		margin: 2px 0;
		padding: 5px;
	}
}*/

article, aside, canvas, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
	display: block;
}

audio {
	display: none;
	height: 0;
	width: 0;
	overflow: hidden;
}

video {
	overflow: hidden;
}

video,
audio[controls],
audio.webshims-controls {
	display: inline-block;
	min-height: 45px;
	min-width: 40px;
}

video > *,
audio > * {
	visibility: hidden;

	.no-swf & {
		visibility: inherit;
	}
}

.flashblocker-assumed {
	min-height: 20px;
	min-width: 20px;
	z-index: 99999;
}

.cue-display {
	position: absolute !important;
	margin: 0;
	padding: 0px !important;
	max-width: 100% !important;
	max-height: 100% !important;
	border: none !important;
	background: none !important;
	text-align: center;
	visibility: hidden;
	font-family: sans-serif;
	font-size: 12px;
	white-space: pre-wrap;
	overflow: hidden;

	b {
		font-weight: bold;
	}

	i {
		font-style: italic;
	}

	u {
		text-decoration: underline;
	}

	span.cue-wrapper {
		position: absolute;
		left: 0;
		bottom: 0;
		right: 0;
		display: block;
		padding: 0;
		margin: 0;
		width: 100%;
		font-size: 160%;
		color: #fff;
		visibility: visible !important;
	}

	.cue-line {
		display: block;
	}

	span.cue {
		display: inline-block;
		padding: 3px 5px;
		background: #000;
		background: rgba(0, 0, 0, 0.8);
		color: #fff;
	}

	.description-cues {
		position: absolute;
		top: -99px;
		left: -99px;
		display: block;
		width: 5px;
		height: 5px;
		overflow: hidden;
	}
}

mark {
	background-color: #ff9;
	color: #000;
	font-style: italic;
	font-weight: bold;
}

/* reset */
.ws-range,
.ws-range *,
.placeholder-box,
.placeholder-text,
.input-buttons,
.input-buttons *,
.details-open-indicator,
.ws-input-seperator,
progress span.progress-value {
	margin: 0;
	padding: 0;
	border: none;
	width: auto;
	background: transparent none;
}
output {
	position: relative;
}

.webshims-visual-hide {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	visibility: hidden !important;
	width: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
}

.webshims-visual-hide * {
	visibility: hidden !important;
}

/* placeholder */
.placeholder-box {
	position: relative;
	display: inline-block;
	zoom: 1;
}

.placeholder-box-input {
	vertical-align: bottom;
}

.placeholder-box-left {
	float: left;
}

.placeholder-box-right {
	float: right;
}

.placeholder-text {
	position: absolute;
	display: none;
	top: 0;
	left: 0;
	overflow: hidden;
	color: #999;
	line-height: 1;
	cursor: text;

	.placeholder-visible &,
	&.placeholder-visible {
		display: inline-block;
	}

	.placeholder-box-input & {
		white-space: nowrap;
	}
}

.placeholder-visible {
	color: #999;
}

.placeholder-focused.placeholder-visible {
	color: #ccc;
}


/* spinner control for time, number (usable for date, datetime-local) */
.has-input-buttons {
	display: inline-block;
}

.input-buttons,
.step-controls,
.ws-popover-opener {
	zoom: 1;
	overflow: hidden;
	display: inline-block;
	font-size: 0;
	vertical-align: middle;
	margin-top: -3px;
	margin-left: -20px;
}

.step-controls,
.ws-popover-opener {
	position: relative;
	float: left;
	margin: 0;
	height: 19px;
	width: 15px;
}

.ws-popover-opener {
	position: relative;
	zoom: 1;
	overflow: visible;
	margin: 0 0 0 2px;
	width: 19px;
	border-radius: 3px;
	cursor: pointer;
	background: #ccc;
	
	span {
		display: block;
		position: absolute;
		top: 50%;
		left: 50%;
		width: 16px;
		height: 16px;
		margin: -8px 0 0 -8px;
		background: url(forms.png) no-repeat -321px -1px;
		
		
		.color-input-buttons & {
			background-position: -348px 0;
		}
		
		.time-input-buttons & {
			background-position: -377px 1px;
		}
		
		&.ws-color-indicator-bg {
			background: url(../jpicker/images/preview-opacity.png) no-repeat 0;
		}
		&.ws-color-indicator {
			background: none;
		}
	}
}

input[type="color"] {
	width: 6.5em;
}

.input-buttons {
	
	&.color-input-buttons {
		margin-left: 2px;
	}
	&.input-button-size-1 {
		&.month-input-buttons,
		&.date-input-buttons {
			margin-left: -24px;
		}
	}
	&.input-button-size-2 {
		margin-left: -39px;
	}
	&.ws-disabled {
		opacity: 0.95;
	}
	&.ws-disabled *,
	&.ws-readonly * {
		cursor: default;
	}
}

.step-controls {

	span {
		position: absolute;
		display: inline-block;
		overflow: hidden;
		margin: 0 !important;
		padding: 0 !important;
		width: 15px;
		height: 9px;
		cursor: pointer;
		font-size: 0;
		line-height: 0;
		background: url(forms.png) no-repeat 0 0;

		&.step-up {
			top: 0;
			background-position: -80px 0;
			&:hover {
				background-position: -105px 0;
			}
			&.mousepress-ui {
				background-position: -105px -20px;
			}
			.ws-disabled & {
				background-position: -130px 0;
			}
		}
		&.step-down {
			bottom: 0;
			background-position: -155px 0;
			&:hover {
				background-position: -180px 0;
			}
			&.mousepress-ui {
				background-position: -180px -20px;
			}
			.ws-disabled & {
				background-position: -205px 0;
			}
		}

	}
}


.ws-input {

	letter-spacing: -0.31em;
    word-spacing: -0.43em;
	
	> * {
		text-align: center;
		letter-spacing: normal;
		word-spacing: normal;
	}
	.ws-input-seperator {
		vertical-align: middle;
		width: 2%;
		overflow: hidden;
	}
	
	& + .input-buttons {
		margin-left: 2px;
	}
	
	input,
	.ws-input-seperator	{
		-moz-box-sizing: border-box;
		box-sizing: border-box;
		text-align: center;
		display: inline-block;
		
	}
	
	
}

.ws-date {

	.mm,
	.dd {
		width: 23.5%;
		
		.no-boxsizing & {
			width: 16%;
		}
	}
	.yy {
		width: 48%;
		
		.no-boxsizing & {
			width: 40%;
		}
	}
	&.ws-month-select {
		
		.dd {
			width: 22%;
			
			.no-boxsizing & {
				width: 13%;
			}
		}
		.mm {
			width: 38%;
		}
		
		.yy {
			width: 36%;
			
			.no-boxsizing & {
				width: 30%;
			}
		}
	}
}

.ws-month {
	.mm,
	.yy {
		width: 47.9%;
		
		.no-boxsizing & {
			width: 41%;
		}
	}
}

/* range */
.ws-range {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	margin: 0;
	zoom: 1;
	border: none;
	height: 19px;
	width: 155px;
	border-radius: 1px;
	background: url(range-track.png) 0 center no-repeat;
	cursor: pointer;
	font-size: 0;
	line-height: 0;

	.ws-range-thumb {
		top: 0;
		position: absolute;
		display: block;
		z-index: 4;
		overflow: hidden;
		margin: -2px 0 0 -6px;
		height: 22px;
		width: 11px;
		background: url(forms.png) -3px 1px no-repeat;
		cursor: pointer;
		outline: none;
		font-size: 0;
		line-height: 0;

		&:hover {
			background-position: -20px 1px;
		}
	}

	&.ws-focus .ws-range-thumb {
		background-position: -20px 1px;
	}
	
	&.ws-active .ws-range-thumb {
		background-position: -37px 1px;
	}
	
	&[aria-disabled="true"],
	&[aria-readonly="true"] {
		cursor: default;
		opacity: 0.95;
	}
	
	&[aria-disabled="true"]  .ws-range-thumb,
	&[aria-readonly="true"]  .ws-range-thumb {
		cursor: default;
	}
	
	&[aria-disabled="true"] .ws-range-thumb {
		background-position: -54px 1px;
	}

	.ws-range-rail {
		position: absolute;
		display: block;
		top: 0;
		left: 5px;
		right: 5px;
		bottom: 0;
		margin: 0;
		zoom: 1;
	}

	.ws-range-min {
		position: absolute !important;
		display: block;
		padding: 0 !important;
		top: 0;
		height: 1px;
		left: 0;
		z-index: 1;
		overflow: hidden;
		background: #b6e2fb;
	}

	.ws-range-ticks {
		overflow: hidden;
		position: absolute;
		bottom: 0px;
		left: 0;
		height: 4px;
		width: 1px;
		margin: 0 0 0 -1.5px;
		font-size: 0;
		line-height: 0;
		text-indent: -999px;
		background: #ccc;
	}

	&.vertical-range {
		background: url(vertical-range.png) center bottom no-repeat;
		width: 20px;

		.ws-range-thumb {
			top: 0;
			left: 3px;
			bottom: auto;
			background: url(vertical-range.png) 0 -51px no-repeat;
			margin: -6px 0 0 0;
			height: 11px;
			width: 22px;

		}
		.ws-range-thumb:hover,
		&.ws-focus .ws-range-thumb {
			background-position: 0 -34px;
		}
		&.ws-active .ws-range-thumb {
			background-position: 0 -17px;
		}

		&[aria-disabled="true"] .ws-range-thumb {
			background-position: 0 0;
		}

		.ws-range-min {
			top: auto;
			bottom: 1px;
			left: 0;
			width: 1px;
			height: 0;
		}

		.ws-range-rail {
			top: 5px;
			left: 0;
			right: 0;
			bottom: 5px;
		}

		.ws-range-ticks {
			bottom: auto;
			left: auto;
			right: 0;
			height: 1px;
			width: 4px;
		}
	}

}






/*
 * popovers
 */
.ws-popover {
	display: block;
	visibility: hidden;
	overflow: hidden;
	position: absolute;
	top: 0;
	left: 0;
	padding: 0 6px 0;
	margin: 0 0 0 -6px;
	z-index: 1100;
	min-width: 90px;
	transition: visibility 400ms ease-in-out;
	
	&.no-transition	{
		display: none;
	}
	
	&.ws-po-visible {
		visibility: visible;
		display: block;
	}
}

.ws-po-outerbox {
	position: relative;
	opacity: 0;
	padding: 11px 0 4px;
	-webkit-transform: translate(0, -100%);
	transform: translate(0, -100%);
	transition: all 400ms ease-in-out;
	
	[data-vertical="bottom"] & {
		-webkit-transform: translate(0, 100%);
		transform: translate(0, 100%);
		padding: 4px 0 11px;
	}
	
	[data-vertical="middle"] & {
		-webkit-transform: translate(0, 0) scale(0);
		transform: translate(0, 0) scale(0);
		padding: 4px 0;
	}

	.ws-popover.ws-po-visible & {
		opacity: 1;
		-webkit-transform: translate(0, 0) scale(1);
		transform: translate(0, 0) scale(1);
	}
}

.ws-po-box {
	border: 1px solid #ccc;
	background: #fefefe;
	padding: 5px;
	box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
	
	
	button {
		display: inline-block;
		overflow: visible;
		position: relative;
		margin: 0;
		border: 0;
		padding: 0;
		-moz-box-sizing: content-box;
		box-sizing: content-box;
		-webkit-appearance: none;
		appearance: none;
		box-sizing: content-box;
		font-family: arial, sans-serif;
		background: transparent;
		cursor: pointer;

		&::-moz-focus-inner {
			border: 0;
			padding: 0;
		}

		&[disabled] {
			cursor: default;
			color: #888;
		}
	}
}

.ws-po-arrow {
	position: absolute;
	top: 4px;
	left: 20px;
	display: block;
	width: 0;
	height: 0;
	border-left: 9px solid transparent;
	border-right: 9px solid transparent;
	border-bottom: 7px solid #ccc;
	border-top: none;
	zoom: 1;
	font-size: 0;
	
	[data-horizontal="center"] & {
		left: 50%;
		margin-left: -5px;
	}
	
	[data-horizontal="right"] & {
		left: auto;
		right: 20px;
	}
	
	[data-vertical="bottom"] & {
		top: auto;
		bottom: 4px;
		border-bottom: none;
		border-top: 7px solid #ccc;
	}

	html & {
		border-left-color: transparent;
		border-right-color: transparent;

		.ws-po-arrowbox {
			border-left-color: transparent;
			border-right-color: transparent;
		}
	}

	[data-vertical="middle"] &,
	* html & {
		display: none;
	}

	.ws-po-arrowbox {
		position: relative;
		top: 1px;
		left: -9px;
		display: block;
		width: 0;
		height: 0;
		border-left: 9px solid transparent;
		border-right: 9px solid transparent;
		border-bottom: 7px solid #fefefe;
		border-top: none;
		z-index: 999999999;
		
		[data-vertical="bottom"] & {
			top: -9px;
			border-bottom: none;
			border-top: 7px solid #fefefe;
		}
	}
}




//date popover
$border-light: 1px solid #ddd;
$button-bgcolor: #f5f5f5;
%ws-button {
	border-radius: 4px;
	background: #ccc;
	padding: 5px 8px;
	display: inline-block;
	border: 1px solid transparent;
}
.input-picker {
	outline: none;
	text-align: center;
	font-family: sans-serif;
	width: 330px;
	
	&.time-popover,
	&.datetime-local-popover {
		width: 415px;
	}
	
	&.time-popover	{
	
		.ws-prev,
		.ws-next,
		.ws-super-prev,
		.ws-super-next		{
			display: none;
		}
	}

	
	&.ws-size-2 {
		width: 645px;
	}
	
	&.ws-size-3 {
		width: 960px;
	}
	
	&.color-popover {
		width: 590px;
	}
	
	abbr[title] {
		cursor: help;
	}
	
	li,
	button {
		font-size: 13px;
		line-height: 16px;
		color: #000;
		transition: all 400ms;
	}
	
	.ws-focus,
	:focus {
		outline: 1px dotted #000;
	}
	

	.ws-po-box {
		position: relative;
		padding: 10px 20px 15px;
		border-radius: 5px;
		box-shadow: 0 0 2px rgba(0, 0, 0, .3);
	}

	.ws-prev,
	.ws-next,
	.ws-super-prev,
	.ws-super-next	{
		@extend %ws-button;
		position: absolute;
		top: 10px;
		border: 1px solid #ccc;
		border-radius: 5px;
		padding: 0;
		width: 24px;
		height: 24px;
		background: #eee url(forms.png) no-repeat 0 0;
		z-index: 1;
		
		span {
			display: none;
		}
	}
	
	
	&.time-popover .ws-picker-body {
		padding-top: 36px;
	}

	.ws-picker-body {
		@extend %clearfix;
		position: relative;
		padding: 46px 0 0;
		zoom: 1;
		margin: 0 -10px;
	}

	.ws-prev,
	.ws-super-prev	{
		left: 20px;
		background-position: -243px 5px;
	}
	
	.ws-super-prev {
		background-position: -243px -12px;
	}
	
	&.ws-year-buttons .ws-prev {
		left: 50px;
	}
	
	.ws-next,
	.ws-super-next {
		right: 20px;
		background-position: -275px 5px;
	}
	
	.ws-super-next {
		background-position: -275px -12px;
	}
	
	&.ws-year-buttons .ws-next {
		right: 50px;
	}
	
	.ws-prev:hover,
	.ws-next:hover,
	.ws-super-prev:hover,
	.ws-super-next:hover	{
		border-color: #666;
	}
	
	.ws-prev[disabled],
	.ws-next[disabled],
	.ws-super-prev[disabled],
	.ws-super-next[disabled]{
		opacity: 0.4;
		border-color: #eee;
	}

	.ws-button-row {
		@extend %clearfix;
		position: relative;
		margin: 10px 0 0;
		border-top: 1px solid #eee;
		padding: 10px 0 0;
		text-align: left;
		z-index: 2;

		button {
			@extend %ws-button;
			
			border: 1px solid #ccc;
			border-radius: 5px;
			box-shadow: 1px 1px 0 #fff;
			background-color: #ddd;
			background-image: -webkit-linear-gradient(top, #ececec 0%, #ddd 100%);
			background-image: linear-gradient(to bottom, #ececec 0%, #ddd 100%);
			transition: border-color 200ms linear;
			float: left;

			&.ws-empty {
				float: right;
			}
		}
	}
	
	&[data-currentview="setMonthList"] .ws-picker-header  select {
		max-width: 95%;
	}
	
	&[data-currentview="setDayList"] .ws-picker-header select {
		max-width: 40%;
	}
	
	&[data-currentview="setDayList"] .ws-picker-header select.month-select {
		max-width: 55%;
	}
	
	&.time-popover .ws-picker-header {
		top: -30px;
		
		button {
			font-size: 15px;
		}
	}
	
	&.ws-year-buttons .ws-picker-header {
		margin: 0 65px;
	}
	
	
	.ws-picker-header {
		position: absolute;
		top: -44px;
		right: 0;
		left: 0;
		margin: 0 40px;

		button {
			display: inline-block;
			width: 100%;
			margin: 0;
			padding: 4px 0;
			font-weight: 700;
			color: #000;
			

			&:hover {
				text-decoration: underline;
			}
			
			&[disabled]:hover {
				text-decoration: none;
			}
		}
	 }
	
	.picker-grid {
		@extend %clearfix;
		position: relative;
		zoom: 1;
		overflow: hidden;
	}
	
	&.ws-size-1 .picker-list  {
		float: none;
		width: auto;
	}
	
	.picker-list {
		@extend %clearfix;
		position: relative;
		zoom: 1;
		width: 290px;
		float: left;
		margin: 0 10px;
		background: #fff;
		
		tr {
			border: 0;
		}

		th,
		td {
			padding: 3px 5px;
		}
		
		&.day-list td {
			padding: 2px 1px;
		}
		
		&.day-list td button {
			padding: 4px 0;
		}


		td button {
			display: block;
			padding: 9px 0;
			width: 100%;
			border-radius: 5px;
			color: #000;
			background-color: #fff;

			&.othermonth {
				color: #888;
			}

			&:hover,
			&.checked-value {
				color: #fff;
				background: #000;
			}

			&[disabled],
			&[disabled]:hover {
				color: #888;
				background-color: #fff;
			}
			
			
		}
		
		table {
			width: 100%;
			border: 0 none;
			border-collapse: collapse;
		}

		th,
		td.week-cell{
			font-size: 13px;
			line-height: 1.1em;
			padding-bottom: 3px;
			text-transform: uppercase;
			font-weight: 700;
		}

		th, td {
			width: 14.2856%;
		}
	}


	.ws-options {
		margin: 10px 0 0;
		border-top: 1px solid #eee;
		padding: 10px 0 0;
		text-align: left;
		
		h5 {
			margin: 0 0 5px;
			padding: 0;
			font-size: 14px;
			font-weight: bold;
		}
		
		ul,
		li {
			padding: 0;
			margin: 0;
			list-style: none;
		}
		
		button {
			display: block;
			padding: 2px 0;
			width: 100%;
			text-align: left;
			
			&.ws-focus,
			&:focus,
			&:hover {
				text-decoration: underline;
			}
			
			&[disabled],
			&[disabled].ws-focus,
			&[disabled]:focus,
			&[disabled]:hover {
				color: #888;
				text-decoration: none;
			}
		}
		
		
	}
}


//data list
datalist {
	display: none;
}

.datalist-polyfill {
	position: absolute !important;
	font-family: "Lucida Grande", "MS Shell Dlg", "Calibri", sans-serif;
	font-size: 100%;

	.datalist-box {
		position: relative;
		max-height: 200px;
		overflow: hidden;
		overflow-x: hidden !important;
		overflow-y: auto;
	}

	ul, li {
		font-size: 100%;
		list-style: none !important;
	}

	ul {
		position: static !important;
		overflow: hidden;
		margin: 0;
		padding: 2px 0;
		height: auto !important;
		background-color: #fff;
		color: #000;
	}

	li {
		margin: 1px 1px 1px 0;
		padding: 2px 2px 2px 5px;
		overflow: hidden;
		white-space: nowrap;
		cursor: default;
		zoom: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		background-color: #fff;
		transition: background-color 400ms;
	}

	mark {
		font-weight: normal;
		font-style: normal;
	}

	.option-value {
		display: inline-block;
		text-overflow: ellipsis;
		max-width: 100%;
		color: #000;
		float: left;
		transition: color 400ms;
	}
	
	.option-label {
		display: none;
		max-width: 100%;
		float: right;
		font-size: 90%;
		color: #666;
		text-overflow: ellipsis;
		vertical-align: bottom;
		margin-top: 0.15em;
		margin-left: 10px;
		text-align: right;
		transition: color 400ms;
	}
	
	.has-option-label  {
		.option-label {
			display: inline-block;
		}
	}


	.hidden-item {
		display: none !important;
	}

	.active-item {
		background-color: #39f;
		.option-value {
			color: #fff;
		}
		.option-label {
			color: #eee;
		}
		cursor: default;
	}
}


.validity-alert {
	display: inline-block;
	font: 12px/140% sans-serif;
	z-index: 1000000000;
}

.ws-errorbox {
	display: none;
	border: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	position: relative;
	
	p {
		margin: 2px 0 3px;
		padding: 0;
		color: #933;
		font: 90%/120% sans-serif;
	}
}

progress {
	position: relative;
	display: inline-block;
	width: 160px;
	height: 16px;

	&[data-position] {
		vertical-align: -0.2em;
		border: 1px solid #ccc;
		background: #e6e6e6;
	}

	> * {
		display: none !important;
	}

	span.progress-value {
		position: absolute;
		display: block !important;
		top: 0;
		left: 0;
		bottom: 0;
		height: 100%;
		background: #a66300;
	}

	&[aria-valuenow] span.progress-value {
		background: #0063a6;
	}
}


/* localStorage */
#swflocalstorageshim-wrapper {
	position: absolute;
	top: -999px;
	left: -9999px;
	overflow: hidden;
	width: 215px;
	min-width: 215px !important;
	z-index: 2147483647;

	.polyfill-exceeded-message {
		margin: 0 0 5px;
		padding: 5px;
		background: #ffd;
		color: #000;
		font-size: 13px;
	}

	object {
		min-height: 138px !important;
		min-width: 215px !important;
	}
}

details {
	overflow: hidden;
}
summary {
	position: relative;
}
.closed-details-child {
	display: none !important;
}

.details-open-indicator {
	margin: -1px 0 0;
	display: inline-block;
	width: 16px;
	height: 11px;
	background: url(details-arrows.png) no-repeat 0 0;
	vertical-align: middle;

	.closed-details-summary & {
		background-position: 0 -20px;
	}
}

summary.summary-has-focus {
	outline: 1px dotted #aaa;
	outline-offset: -1px;
}
